﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="RentSearch.aspx.cs" Inherits="Pages_Public_RentSearch" %>
<%@ Register Src="~/UserControls/Pager.ascx" TagName="Pager" TagPrefix="UC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">
    <style type="text/css">            
        .ThumbImageClickable{ cursor:pointer; width:132px; margin-right:5px; margin-bottom:10px; border:#F1F8F2 2px solid;}
        .ThumbImageClickable:hover{border:#115a08 2px solid;}
        .ListBoxHeading{ color:#115a08; font-weight:bold; text-decoration:none;}
        .ListColumn1{float:left; width:35%;}
        .ListColumn2{float:left; width:40%;}
        .ListColumn3{float:right; width:22%;}
    </style>
    <script language="javascript" type="text/javascript">
        function SerchPropertyForRent() {
            var url = '<%= Request.Url.AbsolutePath %>?<%=AppConstants.QueryString.CITY_ID %>=' + $('#<%=ddlCity.ClientID %>').val()
            + '&<%=AppConstants.QueryString.ZONE_ID %>=' + $('#<%=ddlZone.ClientID %>').val()
            + '&<%=AppConstants.QueryString.RENT_TYPE_ID %>=' + $('#<%=ddlRentType.ClientID %>').val()
            + '&<%=AppConstants.QueryString.FROM_TO %>=' + $('#<%=ddlBedsFrom.ClientID %>').val() + '-' + $('#<%=ddlBedsTo.ClientID %>').val();
            window.location = url + '&Rnd=' + GetRandomNumber();
        }
        $(document).ready(function () {
            $('#<%=ddlCity.ClientID %>').change(function () {
                BindZoneWithDropdownList($(this), $('#<%= ddlZone.ClientID %>'));
            });
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Services>
            <asp:ServiceReference Path="~/Services/AjaxService.asmx" />
        </Services> 
    </asp:ScriptManagerProxy>

    <h4 id="h4Heading" runat="server">Search Properties for Rent</h4>
    <asp:Panel ID="pnlFormContainer" runat="server">

        <div class="GroupBox">
            <div class="GroupHeaderOverlay">Search Options</div>
            <table cellpadding="3" cellspacing="0" style="width:65%;">                
                <colgroup>
                    <col style="width:25%;" />
                    <col />
                </colgroup>
                <tr>                    
                    <td>City</td>
                    <td>
                        <asp:DropDownListX ID="ddlCity" runat="server" CssClass="DropDownListCommon">
                            <asp:ListItem Value="" Text=""></asp:ListItem>
                        </asp:DropDownListX>
                    </td>
                </tr>
                <tr>
                    <td>Zone</td>
                    <td>
                        <asp:DropDownList ID="ddlZone" runat="server">
                            <asp:ListItem Value="" Text=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>Beds From</td>
                    <td>
                        <asp:DropDownList ID="ddlBedsFrom" runat="server" CssClass="BigBropDownList">
                            <asp:ListItem Text="1" Value="1"></asp:ListItem>
                            <asp:ListItem Text="2" Value="2"></asp:ListItem>
                            <asp:ListItem Text="3" Value="3"></asp:ListItem>
                            <asp:ListItem Text="4" Value="4"></asp:ListItem>
                            <asp:ListItem Text="5" Value="5"></asp:ListItem>
                            <asp:ListItem Text="More" Value="6"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>Beds To</td>
                    <td>
                        <asp:DropDownList ID="ddlBedsTo" runat="server" CssClass="BigBropDownList">
                            <asp:ListItem Text="1" Value="1"></asp:ListItem>
                            <asp:ListItem Text="2" Value="2"></asp:ListItem>
                            <asp:ListItem Text="3" Value="3"></asp:ListItem>
                            <asp:ListItem Text="4" Value="4"></asp:ListItem>
                            <asp:ListItem Text="5" Value="5"></asp:ListItem>
                            <asp:ListItem Text="More" Value="6"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>Rent Type</td>
                    <td>
                        <asp:DropDownList ID="ddlRentType" runat="server">
                            <asp:ListItem Value="" Text=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>                    
                </tr>
                <tr>
                    <td colspan="2">
                        <input type="button" class="ButtonCommon" value="Search" onclick="SerchPropertyForRent();" />
                    </td>
                </tr>
            </table>
        </div>
        <div style="margin:10px 0px 10px 0px;"> 
            <div id="divNoRecordMessage" runat="server" visible="false" enableviewstate="false"></div>       
            <asp:Literal ID="ltrListing" runat="server"></asp:Literal>
        </div>    
        <div>
            <UC:Pager ID="ucPagerBottom" runat="server" NumberOfPageLinksToDisplay="7" OnPageIndexChanged="ucPagerBottom_PageIndexChanged" />
        </div>
    </asp:Panel>

    <%--Modal Popup Section Starts From Here--%>
    <div id="divModalConfirm" class="PopupContainer" style="display: none; width:800px; height:500px;">        
        <div class="PopupBody" style="padding:5px;">            
            <div style="overflow:auto; height:450px;">
                <img id="imgImageViewer" src="/Images/Loading.gif" />
            </div>
        </div>
        <div class="PopupButtonContainer">                        
            <input type="button" value="Close" class="ButtonCommon" onclick="CloseImageViewer();" />            
        </div>
    </div>
    <%--Modal Popup Section Ends Here--%>
</asp:Content>

